#include <stdio.h>
struct Student {
    long long int number;
    double academic_grades;
    double grades;
}
student[100000];
int main() {
    int n;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%lld %lf %lf", &student[i].number, &student[i].academic_grades, &student[i].grades);
    }
    for(int i = 0; i < n; i++){
        if (student[i].academic_grades*7+student[i].grades*3>=800&&student[i].academic_grades+student[i].grades>140) {
            printf("Excellent\n");
        } else {
            printf("Not excellent\n");
        }
    }
    return 0;
}